package com.rogue.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rogue.system.domain.entity.SysRole;
import org.apache.ibatis.annotations.Select;

/**
* @author Yeah
* @description 针对表【hs_role(用户角色表)】的数据库操作Mapper
* @createDate 2022-03-16 14:20:29
* @Entity generator.domain.HsRole
*/
public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 根据角色名查找角色 Id
     * @author Yeah
     * @date 2022/3/20
     * @param roleName 角色名
     * @return java.lang.Long
     */
    @Select("SELECT id FROM `sys_role`\n" +
            "WHERE role_code = #{roleName}")
    Long findRoleByName(String roleName);
}




